<%@ include file="../common/top.jsp"%>

<h2>My Orders</h2>

<div class="orders">
    <table class="listOrders">
        <tr>
            <th>Order ID</th>
            <th>Date</th>
            <th>Total Price</th>
        </tr>

        <c:forEach var="order" items="${sessionScope.orderList}">
            <tr>
                <td>
                    <a href="viewOrder1?orderId=${order.orderId}">
                        <p name="orderId" value="${order.orderId}">${order.orderId}</p>
                    </a>
                </td>
                <td><fmt:formatDate value="${order.orderDate}"
                                    pattern="yyyy/MM/dd hh:mm:ss" /></td>
                <td><fmt:formatNumber value="${order.totalPrice}"
                                      pattern="$#,##0.00" /></td>
            </tr>
        </c:forEach>
    </table>
</div>

<%@ include file="../common/bottom.jsp"%>